<template >
  <div class="add_con_form tl" v-loading="loading">
    <el-dialog :close-on-click-modal="false" title="商户二维码" class="tc tl size_13" :append-to-body="true" :visible.sync="visible"
      :show="show" width="370px" center @close="$emit('update:show',false)" :before-close="closeDialog">
      <iframe :src="wxewm_url" width="75%" height="250" frameborder="0" class="iframe_img"></iframe>
    </el-dialog>
  </div>
</template>


<style lang="less" scoped></style>

<script>
export default {
  data() {
    return {
      value: "",
      wxewm_url: "",
      data: {
        id: ""
      },
      loading: false,
      dataYZ: {},
      visible: this.show
    };
  },
  props: {
    show: Boolean,
    editId: String,
    clickNum: Number
  },
  methods: {
    closeDialog() {
      this.visible = false;
    },
    getDetails(id) {
      var data = {};
      data["id"] = id;
      this.$api.getSupplier.getSupplierEwm(data).then(res => {
        this.wxewm_url = res.data.result;
      });
    }
  },
  watch: {
    show() {
      console.log(this.show);
      this.visible = this.show;
    },
    clickNum(id) {
      this.data.id = this.editId;
      this.data.content = "";
      console.log("点击button次数", id);
      console.log("编辑ID=" + this.editId);
      this.getDetails(this.editId);
    }
  },
  mounted() {},
  created() {}
};
</script>
